<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('大区会长产品合作区域列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>大区会长：</label>
                                <input type="text" name="agentName"/>
                            </li>
                            <li>
                                <label>会长名称：</label>
                                <input type="text" name="agentPerson"/>
                            </li>
                            <li>
                                <label>会长电话：</label>
                                <input type="text" name="agentPhone"/>
                            </li>
                            <li>
                                <label>产品名称：</label>
                                <input type="text" name="partsName"/>
                            </li>
                            <!--<li>
                                <label>合作产品的年份：</label>
                                <input type="text" name="year"/>
                            </li>-->
                            <!--<li>
                                <label>省份code：</label>
                                <input type="text" name="province"/>
                            </li>-->
                            <li>
                                <label>省份名称：</label>
                                <input type="text" name="provinceName"/>
                            </li>
                            <!--<li>
                                <label>市区code：</label>
                                <input type="text" name="city"/>
                            </li>-->
                            <li>
                                <label>市区名称：</label>
                                <input type="text" name="cityName"/>
                            </li>
                            <!--<li>
                                <label>区县code：</label>
                                <input type="text" name="district"/>
                            </li>-->
                            <li>
                                <label>区县名称：</label>
                                <input type="text" name="districtName"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <!--<div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="zsyh:agentCooperateRel:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="zsyh:agentCooperateRel:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="zsyh:agentCooperateRel:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="zsyh:agentCooperateRel:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>-->
            <div class="col-sm-12 select-table table-bordered">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('zsyh:agentCooperateRel:edit')}]];
        var removeFlag = [[${@permission.hasPermi('zsyh:agentCooperateRel:remove')}]];
        var prefix = ctx + "zsyh/agentCooperateRel";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "大区会长产品合作区域",
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                columns: [{
                    field : 'Number',
                    title : '序号',
                    align: 'center',
                    width: 20,
                    formatter : function(value, row, index) {
                        var pageSize = $('#bootstrap-table').bootstrapTable('getOptions').pageSize;//通过表的#id 可以得到每页多少条
                        var pageNumber = $('#bootstrap-table').bootstrapTable('getOptions').pageNumber;//通过表的#id 可以得到当前第几页
                        return pageSize * (pageNumber - 1) + index + 1;//返回每条的序号： 每页条数 * （当前页 - 1 ）+ 序号
                    }
                },
                {
                    field: 'id',
                    title: '大区会长产品合作区域id',
                    visible: false
                },
                /*{
                    field: 'cooperateId',
                    title: '合作表id'
                },*/
                    {
                        field: 'agentName',
                        align: 'center',
                        title: '大区会长'
                    },{
                        field: 'agentPerson',
                        align: 'center',
                        title: '会长名称'
                    },{
                        field: 'agentPhone',
                        align: 'center',
                        title: '联系方式'
                    },
                {
                    field: 'partsName',
                    align: 'center',
                    title: '产品名称'
                },
                {
                    field: 'year',
                    align: 'center',
                    title: '合作产品的年份'
                },
                {
                    field: 'provinceName',
                    align: 'center',
                    title: '省份名称'
                },
                {
                    field: 'cityName',
                    align: 'center',
                    title: '市区名称'
                },
                {
                    field: 'districtName',
                    align: 'center',
                    title: '区县名称'
                },{
                    field: 'peopleNum',
                    align: 'center',
                    title: '人口数量(万)'
                },
                /*{
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }*/]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>